import Vue from 'vue'
import Router from 'vue-router'


const home = () => import( '@/pages/home')
const type = () => import( '@/pages/type')
const collo = () => import( '@/pages/collo')
const cart = () => import( '@/pages/cart')
const user = () => import( '@/pages/user')
const shouye = () => import( '@/components/shouye')
const Login = () => import(/* webpackChunkName: "group-foo" */ '../components/login')
const Logintwo = () => import(/* webpackChunkName: "group-foo" */ '../components/logintwo')
Vue.use(Router)


const routes=[
	{
		path:"/login",
		component:Login,
		children:[
			{
				path:"/login/logintwo",
				component:Logintwo
			}
		]
	},
  {
      path: '/',
      redirect: 'home'
    },
    {
      path: '/home',
      name:'home',
      component: home
    },
    {
      path: '/type',
      name:'type',
      component: type
    },
    {
      path: '/collo',
      name:'collo',
      component: collo
    },
    {
      path: '/cart',
      name:'cart',
      component: cart
    },
    {
      path: '/user',
      name:'user',
      component: user
    },
    {
      path: '/shouye',
      component: shouye
    }
]

export default new Router({
  routes
})
